$blue: #3190e8;
$bc: #e4e4e4;
$fc:#fff;
$bdc: #ebebeb;
// 背景图片地址和大小
@mixin bis($url) {
  background-image: url($url);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

@mixin borderRadius($radius: 50%) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
  border-radius: $radius;
}
//定位全屏
@mixin allcover{
  position:absolute;
  top:0;
  right:0;
}

//定位上下左右居中
@mixin center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
}

//定位上下居中
@mixin cl {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height){
  width: $width;
  height: $height;
}
//高和行高
@mixin hl($height){
  height: $height;
  line-height: $height;
}

//字体大小、行高、字体
@mixin font($size, $line-height, $family: 'Microsoft YaHei') {
  font: #{$size}/#{$line-height} $family;
}

//字体大小，颜色
@mixin sc($size, $color){
  font-size: $size;
  color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between){
  display: flex;
  display: box;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  justify-content: $type;
}
@mixin flex($size: 1) {
  -webkit-box-flex: $size;
  -webkit-flex: $size;
  flex: $size;
  box-flex: $size;
}

// 字体超过长度隐藏
@mixin tto() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 伪元素小箭头
@mixin arrow($top, $left, $size, $borderWidth, $borderColor, $aspect, $bgc: #fff) {
  &::after {
    content: '';
    position: absolute;
    left: $left;
    top: $top;
    transform: translate(-50%, -50%);
    width: $size;
    height: $size;
    border:$borderWidth solid $borderColor;
    border-top-color: transparent;
    border-right-color: transparent;
    background-color: $bgc;
    @if $aspect == left {
      transform: rotate(-315deg);
      -webkit-transform: rotate(-315deg);
    } @else if $aspect == top {
      transform: rotate(-225deg);
      -webkit-transform: rotate(-225deg);
    } @else if $aspect == right {
      transform: rotate(-135deg);
      -webkit-transform: rotate(-135deg);
    } @else if $aspect == bottom {
      transform: rotate(-45deg);
      -webkit-transform: rotate(-45deg);
    }
  }
}

@mixin clearfix() {
  &::after, &::before {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// 一像素
@mixin border1px ($direction, $color) {
  &:after {
    content: " ";
    display: block;
    position: absolute;
    @if $direction == left {
      top: 0;
      left: 0;
      height: 100%;
      width:0;
      border-right: 1px solid $color;
      transform: scaleX(0.5);
    } @else if $direction == top {
      top: 0;
      left: 0;
      height: 0;
      width: 100%;
      border-top: 1px solid $color;
    } @else if $direction == right {
      right: 0;
      top: 0;
      height: 100%;
      width:0;
      border-right: 1px solid $color;
      transform: scaleX(0.5);
    } @else if $direction == bottom {
      bottom: 0;
      left: 0;
      height: 0;
      width: 100%;
      border-top: 1px solid $color;
      transform: scaleY(0.5);
    }
  }
}
